package com.zjdiepu.www.biz.system;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zjdiepu.www.base.core.BaseService;
import com.zjdiepu.www.dao.system.DpSalemanManagerMapper;
import com.zjdiepu.www.ibiz.system.IDpSalemanManagerService;
import com.zjdiepu.www.model.system.dto.DpBaseSaleman;
import com.zjdiepu.www.model.system.ext.DpBaseSalemanExt;
import com.zjdiepu.www.model.third.dto.JuheSeries;
@Service
public class DpSalemanManagerServiceImpl extends BaseService implements IDpSalemanManagerService {

	@Autowired
	private DpSalemanManagerMapper dpSalemanManagerMapper;

	/* 
	* @author zhangzj
	* <p>Title: queryByPage</p> 
	* <p>Description: 查询所有业务员信息</p> 
	* @param pageNo
	* @param pageSize
	* @param aWhere
	* @return 
	* @see IDpSalemanManagerService#queryByPage(java.lang.Integer, java.lang.Integer, java.util.Map)
	* @version V1.0
	*/
	@Override
	public PageInfo<DpBaseSaleman> queryByPage(Integer pageNo, Integer pageSize, Map<String, Object> aWhere) {
		pageNo = pageNo == null?1:pageNo;
		pageSize = pageSize == null?10:pageSize;
		PageHelper.startPage(pageNo, pageSize);
		List<DpBaseSaleman> list=dpSalemanManagerMapper.queryByPage(aWhere);
		PageInfo<DpBaseSaleman> page = new PageInfo<DpBaseSaleman>(list);
		return page;
	}

	@Override
	public void insert(DpBaseSaleman saleman) {
		
		dpSalemanManagerMapper.insert(saleman);
	}

	@Override
	public DpBaseSaleman getById(String id) {
		return dpSalemanManagerMapper.getById(id);
	}

	@Override
	public void update(DpBaseSaleman saleman) {
		
		dpSalemanManagerMapper.update(saleman);
	}

	@Override
	public void delete(String id) {
		
		dpSalemanManagerMapper.delete(id);
	}

	@Override
	public int countByExt(DpBaseSalemanExt dpBaseSalemanExt) {
		return dpSalemanManagerMapper.countByExt(dpBaseSalemanExt);
	}

	@Override
	public List<JuheSeries> selectByExt(DpBaseSalemanExt dpBaseSalemanExt) {
		return dpSalemanManagerMapper.selectByExt(dpBaseSalemanExt);
	}
	
}
